﻿using dz.u9.jky.schema.Attrib;
using dz.u9.jky.schema.Common;
using System;
using System.Collections.Generic;

namespace dz.u9.jky.schema.PM
{
    public class RcvLine
    {
        [DzSimpleObject("UFIDA.U9.CBO.SCM.Customer.CustomerSiteMISCInfo,UFIDA.U9.CBO.PubBE")]
        /// <summary>
        /// 收货客户位置
        /// </summary>
        public string CustomerShipToSite { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 计价单位
        /// </summary>
        public string PriceUOM { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 计价基准单位
        /// </summary>
        public string PriceBaseUOM { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 采购基准单位
        /// </summary>
        public string TradeBaseUOM { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 库存基准单位
        /// </summary>
        public string StoreBaseUOM { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 成本单位
        /// </summary>
        public string CostUOM { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 成本基准单位
        /// </summary>
        public string CostBaseUOM { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 采购单位 
        /// </summary>
        public string TradeUOM { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 库存单位
        /// </summary>
        public string StoreUOM { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 项目
        /// </summary>
        public string Project { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 任务 
        /// </summary>
        public string Task { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 货主组织
        /// </summary>
        public string OwnOrg { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 库管员
        /// </summary>
        public string WhMan { get; set; }

        [DzComplexObject("UFIDA.U9.CBO.SCM.Supplier.SupplierSiteMISCInfo,UFIDA.U9.CBO.PubBE")]
        /// <summary>
        /// 立账位置
        /// </summary>
        public string ShipToSite { get; set; }

        [DzComplexObject("UFIDA.U9.CBO.SCM.Supplier.SupplierSiteMISCInfo,UFIDA.U9.CBO.PubBE")]
        /// <summary>
        /// 发货位置
        /// </summary>
        public string BillToSite { get; set; }

        /// <summary>
        ///  赠品
        /// </summary>
        public bool IsPresent { get; set; } = false;

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 需求部门
        /// </summary>
        public string RequireDept { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 采购组织
        /// </summary>
        public string PurOrg { get; set; }

        /// <summary>
        /// 采购-库存
        /// </summary>
        public decimal TBUToSBURate { get; set; } = 1;

        /// <summary>
        /// 采购-计价
        /// </summary>
        public decimal TBUToPBURate { get; set; } = 1;

        /// <summary>
        /// 计划到货量1 
        /// </summary>
        public decimal PlanQtyTU { get; set; }

        /// <summary>
        /// 实到数量1 
        /// </summary>
        public decimal ArriveQtyTU { get; set; }

        /// <summary>
        /// 实到数量
        /// </summary>
        public decimal ArriveQtyPU { get; set; }

        /// <summary>
        /// 点收数量1 
        /// </summary>
        public decimal EyeballingQtyTU { get; set; }

        /// <summary>
        /// 合格数量1
        /// </summary>
        public decimal QualifiedQtyTU { get; set; } = 0;

        /// <summary>
        /// 不合格数量1 
        /// </summary>
        public decimal UnqualifiedQtyTU { get; set; } = 0;

        /// <summary>
        /// 拒收数量1
        /// </summary>
        public decimal RejectQtyTU { get; set; } = 0;

        [DzEnum("UFIDA.U9.CBO.SCM.Enums.PurRejectReasonEnum,UFIDA.U9.CBO.SCMBE")]
        /// <summary>
        /// 拒收原因
        /// </summary>
        public int RejectReason { get; set; } = -1;

        /// <summary>
        /// 实收数量1
        /// </summary>
        public decimal RcvQtyTU { get; set; }

        /// <summary>
        /// 实收数量
        /// </summary>
        public decimal RcvQtyPU { get; set; }

        /// <summary>
        /// 入库确认日
        /// </summary>
        public DateTime ConfirmDate { get; set; }

        /// <summary>
        /// 退补数量1 
        /// </summary>
        public decimal RtnFillQtyTU { get; set; } = 0;

        /// <summary>
        /// 退补数量 
        /// </summary>
        public decimal RtnFillQtyPU { get; set; } = 0;

        /// <summary>
        /// 退扣数量1
        /// </summary>
        public decimal RtnDeductQtyTU { get; set; } = 0;

        /// <summary>
        /// 退扣数量 
        /// </summary>
        public decimal RtnDeductQtyPU { get; set; } = 0;

        [DzComplexObject("UFIDA.U9.PM.Rtn.RtnReason,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 退货原因 
        /// </summary>
        public string RtnReason { get; set; }

        /// <summary>
        /// 实收价税合计
        /// </summary>
        public decimal TotalMnyTC { get; set; }

        /// <summary>
        /// 实收未税额
        /// </summary>
        public decimal TotalNetMnyTC { get; set; }

        /// <summary>
        /// 实收税额
        /// </summary>
        public decimal TotalTaxTC { get; set; }

        [DzEnum("UFIDA.U9.CBO.FI_SCM.DTOs.TaxMnyTypeEnum,UFIDA.U9.CBO.FI_SCMBE")]
        public int TaxType { get;set;}

        /// <summary>
        /// 估价价格
        /// </summary>

        public decimal EvaluationPriceCU { get; set; }

        /// <summary>
        /// 估价金额
        /// </summary>
        public decimal EvaluationMnyAC { get; set; }
        /// <summary>
        /// 价格含税 
        /// </summary>
        public bool IsPriceIncludeTax { get; set; } = true;

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 税组合
        /// </summary>
        public string TaxSchedule { get; set; }

        /// <summary>
        /// 税率
        /// </summary>
        /// 
        public decimal TaxRate { get; set; }

        [DzEnum("UFIDA.U9.CBO.SCM.Supplier.ReceiptModeEnum,UFIDA.U9.CBO.PubBE")]
        /// <summary>
        /// 收货程序
        /// </summary>
        public int RcvProcedure { get; set; } = 0;

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 需求组织
        /// </summary>
        public string RequireOrg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal TBUToCBURate { get; set; } = 1;

        [DzList("UFIDA.U9.ISV.RCV.DTO.OBARcvLineDispenseDTO,UFIDA.U9.ISV.PM.PMISV")]
        /// <summary>
        /// 分发记录
        /// </summary>
        public List<RcvLineDispense> RcvLineDispenses { get; set; } = new List<RcvLineDispense>();  

        [DzSimpleObject("UFIDA.U9.CBO.SCM.Item.ItemInfo,UFIDA.U9.CBO.PubBE", "ItemCode")]
        /// <summary>
        /// 物料
        /// </summary>
        public string ItemInfo { get; set; }

        /// <summary>
        /// 弹性域
        /// </summary>
        [DzComplexObject("UFIDA.U9.Base.FlexField.DescFlexField.DescFlexSegments,UFIDA.U9.Base.BaseBE")]
        public DescFlexField DescFlexField { get; set; }

        [DzEnum("UFIDA.U9.CBO.Enums.ChargeTypeEnum,UFIDA.U9.CBO.PubBE")]
        /// <summary>
        /// 收货方式
        /// </summary>
        public int ChargeType { get; set; } = 0;

        /// <summary>
        /// 行号
        /// </summary>
        public int DocLineNo { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 存储地点
        /// </summary>
        public string Wh { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 收货部门
        /// </summary>
        public string RcvDept { get; set; }


 
        [DzComplexObject(" UFIDA.U9.CBO.SCM.RcvBy.RcvBy, UFIDA.U9.CBO.PubBE")]
        /// <summary>
        /// 收货原则
        /// </summary>
        public string RcvBy { get; set; }

        [DzComplexObject(" UFIDA.U9.CBO.SCM.Supplier.SupplierMISCInfo, UFIDA.U9.CBO.PubBE")]
        /// <summary>
        /// 付款供应商
        /// </summary>
        public string Payer { get; set; }

        [DzComplexObject("UFIDA.U9.CBO.SCM.Supplier.SupplierSiteMISCInfo,UFIDA.U9.CBO.PubBE")]
        /// <summary>
        /// 付款位置
        /// </summary>
        public string PayerSite { get; set; }

        [DzComplexObject(" UFIDA.U9.CBO.SCM.Supplier.SupplierMISCInfo, UFIDA.U9.CBO.PubBE")]
        /// <summary>
        /// 立账供应商
        /// </summary>
        public string ConfirmSupplier { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 立账条件
        /// </summary>
        public string ConfirmTerm { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 付款条件
        /// </summary>
        public string PaymentTerm { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 核算组织 
        /// </summary>
        public string AccountOrg { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 采购部门
        /// </summary>
        public string PurDept { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 采购员
        /// </summary>
        public string PurOper { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 结算路径 
        /// </summary>
        public string BalanceRoute { get; set; }

        [DzComplexObject(" UFIDA.U9.CBO.SCM.Supplier.SupplierMISCInfo, UFIDA.U9.CBO.PubBE")]

        /// <summary>
        /// 厂牌
        /// </summary>
        public string Mfc { get; set; }

        /// <summary>
        /// 定价
        /// </summary>
        public decimal OrderPriceTC { get; set; }

        /// <summary>
        /// 系统价 
        /// </summary>
        public decimal SysPriceTC { get; set; }

        /// <summary>
        /// 最终价
        /// </summary>
        public decimal FinallyPriceTC { get; set; }

        /// <summary>
        /// 计划到货量 
        /// </summary>
        public decimal PlanQtyPU { get; set; }

        /// <summary>
        /// 合格数量
        /// </summary>
        public decimal QualifiedQtyPU { get; set; } = 0;

        /// <summary>
        /// 不合格数量
        /// </summary>
        public decimal UnqualifiedQtyPU { get; set; } = 0;

        /// <summary>
        /// 拒收数量
        /// </summary>
        public decimal RejectQtyPU { get; set; } = 0;

        /// <summary>
        /// 退扣未税额
        /// </summary>
        public decimal RtnDeductNetMnyTC { get; set; } = 0;

        /// <summary>
        /// 退扣价税合计
        /// </summary>
        public decimal RtnDeductMnyTC { get; set; } = 0;

        /// <summary>
        /// 退扣税额 
        /// </summary>
        public decimal RtnDeductTaxTC { get; set; } = 0;

        [DzEnum("UFIDA.U9.CBO.SCM.Enums.QCConclusionEnum,UFIDA.U9.CBO.SCMBE")]
        /// <summary>
        /// 收货结论
        /// </summary>
        public int QCConclusion { get; set; } = 0;

        /// <summary>
        /// 供应商批号
        /// </summary>
        public string SupplierLotCode { get; set; }

        /// <summary>
        /// 失效日期(供应商)
        /// </summary>
        public DateTime SupplierDisabledTime { get; set; }

        /// <summary>
        /// 收货批号
        /// </summary>
        public string RcvLotCode { get; set; }

        /// <summary>
        /// 库存批号
        /// </summary>
        public string InvLotCode { get; set; }

        /// <summary>
        /// 失效日期
        /// </summary>
        public DateTime InvDisabledTime { get; set; }

        /// <summary>
        /// 点收数量2
        /// </summary>
        public decimal EyeballingQtyTBU { get; set; } = 0;

        /// <summary>
        /// 合格数量2
        /// </summary>
        public decimal QualifiedQtyTBU { get; set; } = 0;

        /// <summary>
        /// 不合格数量2 
        /// </summary>
        public decimal UnqualifiedQtyTBU { get; set; } = 0;

        /// <summary>
        /// 实收数量2
        /// </summary>
        public decimal RcvQtyTBU { get; set; } = 0;

        /// <summary>
        /// 退扣数量2 
        /// </summary>
        public decimal RtnDeductQtyTBU { get; set; } = 0;

        /// <summary>
        /// 退补数量2
        /// </summary>
        public decimal RtnFillQtyTBU { get; set; } = 0;

        [DzEnum("UFIDA.U9.CBO.Enums.StorageTypeEnum,UFIDA.U9.CBO.PubBE")]
        /// <summary>
        /// 存储类型 0 待检 1在检 2不合格 3报废 4可用 5冻结 6冻结 7待返工（请传4）
        /// </summary>
        public int StorageType { get; set; } = 4;

        [DzSimpleObject("UFIDA.U9.CBO.Pub.Controller.CommonArchiveDataDTO,UFIDA.U9.CBO.PubSV")]
        /// <summary>
        /// 收票客户位置 
        /// </summary>
        public string CusBillToSite { get; set; }

        /// <summary>
        /// Sn序列化
        /// </summary>
        public string SnCode { get; set; }

        /// <summary>
        /// 是零成本
        /// </summary>
        public bool IsZeroCost { get; set; } = false;

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 需求人员
        /// </summary>
        public string RequireMan { get; set; }

        /// <summary>
        /// 到货时间
        /// </summary>
        public DateTime ArrivedTime { get; set; }

        /// <summary>
        /// 预计到期日
        /// </summary>
        public DateTime PreMaturityDate { get; set; }

        [DzEnum("UFIDA.U9.CBO.SCM.Item.ChargeProcessModeEnum,UFIDA.U9.CBO.PubBE")]
        /// <summary>
        /// 费用料品处理方式 
        /// </summary>
        public int ChargeProcessMode { get; set; } = 1;

        [DzComplexObject(" UFIDA.U9.CBO.SCM.Supplier.SupplierMISCInfo, UFIDA.U9.CBO.PubBE")]
        /// <summary>
        /// 退货供应商
        /// </summary>
        public string ReturnSupplier { get; set; }

        /// <summary>
        /// 是否关系企业
        /// </summary>
        public bool IsRelationCompany { get; set; } = false;

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// SeiBan
        /// </summary>
        public string SeiBan { get; set; }

        /// <summary>
        /// 有效期天数 
        /// </summary>
        public int InvLotValidDate { get; set; } = 0;

        /// <summary>
        /// 生效日期 
        /// </summary>
        public DateTime InvLotEnableDate { get; set; }

        /// <summary>
        /// 计划到货日
        /// </summary>
        public DateTime PlanArrivedDate { get; set; }

        /// <summary>
        /// 库存-成本转换率
        /// </summary>
        public decimal SUToCURate { get; set; } = 1;



        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]
        /// <summary>
        /// 销售退货组织
        /// </summary>
        public string SaleRtnOrg { get; set; }

        [DzSimpleObject("UFIDA.U9.PM.DTOs.BESimp4UIDTO,UFIDA.U9.PM.PMBE")]

        /// <summary>
        /// 销售退货存储地点
        /// </summary>
        public string SaleRtnWH { get; set; }

        [DzList("UFIDA.U9.ISV.RCV.DTO.OBARcvDiscountDTO,UFIDA.U9.ISV.PM.PMISV")]
        public List<RcvDiscount> RcvDiscount { get; set; } = new List<RcvDiscount>();

        [DzList("UFIDA.U9.ISV.RCV.DTO.OBARcvTaxDTO,UFIDA.U9.ISV.PM.PMISV")]
        public List<RcvTax> RcvTaxs { get; set; } = new List<RcvTax>();

        [DzList("UFIDA.U9.ISV.RCV.DTO.OBARcvLineAllotMODTO,UFIDA.U9.ISV.PM.PMISV")]
        public List<RcvLineAllotMO> RcvLineAllotMOs { get; set; } = new List<RcvLineAllotMO>();

        /// <summary>
        /// 库位信息 
        /// </summary>
        [DzList("UFIDA.U9.ISV.RCV.DTO.OBARcvLineLocationDTO,UFIDA.U9.ISV.PM.PMISV")]
        public List<RcvLineLocation> RcvLineLocations { get; set; } = new List<RcvLineLocation>();

        [DzList("UFIDA.U9.ISV.RCV.DTO.OBARcvAddressDTO,UFIDA.U9.ISV.PM.PMISV")]
        public List<RcvAddress> RcvAddress { get; set; } = new List<RcvAddress>();

        [DzList("UFIDA.U9.ISV.RCV.DTO.OBARcvContactDTO,UFIDA.U9.ISV.PM.PMISV")]
        public List<RcvContact> RcvContacts { get; set; } = new List<RcvContact>();

        [DzList("UFIDA.U9.ISV.RCV.DTO.OBARcvSubLineDTO,UFIDA.U9.ISV.PM.PMISV")]
        public List<RcvSubLine> RcvSubLines { get; set; } = new List<RcvSubLine>();

  
    }
}
